package com.test.mytest.hessian;

import com.donglu.carpark.service.StoreHessianServiceI;
import com.donglu.carpark.service.Model.Info;
import com.donglu.carpark.service.Model.LoginInfo;

public class HessianTask implements Runnable {
	private Info info;
	private StoreHessianServiceI storeHessianService;
	public HessianTask() {
	}
	public HessianTask(Info info,StoreHessianServiceI storeHessianService) {
		this.info=info;
		this.storeHessianService=storeHessianService;
	}
	@Override
	public void run() {
		if (info.getClass().equals(LoginInfo.class)) {
			LoginInfo li=(LoginInfo) info;
			System.out.println(li.getName()+"=============="+li.getPwd());
			info.setMsg("登录成功");
			storeHessianService.send(info);
		}
	}
	
}
